package utils;

import electron.renderer.IpcRenderer;
import haxe.ui.Toolkit;

class Theme {
	/**
	 * 设置主题（暗黑模式/高亮模式）
	 * @param theme 
	 */
	public static function setTheme(theme:String):Void {
		Toolkit.theme = theme;
		IpcRenderer.send("change-theme", theme == "dark" ? "#27292a" : "#ffffff");
		SaveData.setItem("theme", Toolkit.theme);
	}
}